/**
 * User: alesj
 * Date: 2004.9.8
 * Time: 14:15:00
 */

package com.generalynx.ecos.utils;

import com.generalynx.common.data.IEntity;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.validation.DataBinder;
import org.springframework.validation.Validator;

public interface IBindable extends IEntity {

    /* create, save and update interceptor methods */

    void afterCreate();
    void beforeInsert(Context context);
    void beforeSaveOrUpdate(BeanFactory beanFactory);

    /* using when binding from controllers */

    void registerCustomEditors(DataBinder binder);
    void beforeBind();
    void afterBind();

    /* validate after bind */

     Validator validator();

}
